import request from "@/core/request.js";

export const getImg = () => request({
	url: 'validate/code/get'
})

export const login = ({ account, pwd, key, code }) => request({
	method: 'post',
	url: 'login',
	data: { account, pwd, key, code }
})

export const logout = () => request({
	method: 'get',
	url: 'logout',
})

export const getUserInfo = () => request({
	url: 'getAdminInfoByToken'
})

export const getMenus = () => request({
	url: 'getMenus'
})

export const getInfo = (id) => request({
	url: 'article/info',
	data: { id },
})